# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Cédric Bellegarde cedric bellegarde at adishatz dot org

pkgname=eolie
pkgver=0.9.101
pkgrel=4
pkgdesc='Simple web browser for GNOME'
arch=('any')
url='https://wiki.gnome.org/Apps/Eolie'
license=('GPL3')
depends=('gnome-settings-daemon' 'gtkspell3' 'libhandy' 'python-cairo' 'python-gobject' 'webkit2gtk')
makedepends=('git' 'gobject-introspection' 'meson')
optdepends=('python-beautifulsoup4: Import HTML bookmarks'
            'python-fxa: Firefox Sync support'
            'python-pycryptodome: Firefox Sync support' 
            'python-pyopenssl: Show SSL certificates'
            'python-requests-hawk: Firefox Sync support')
_commit=168b669f0bccdf41ccabfbd380af685e812f9384  # tags/0.9.101
source=("git+https://gitlab.gnome.org/World/eolie.git#commit=$_commit"
        "git+https://gitlab.gnome.org/gnumdk/eolie-po.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  git config submodule.subprojects/po.url "$srcdir/eolie-po"
  git -c protocol.file.allow=always submodule update --init
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
